package com.ssy.lingxi.settle.accounts.repository;

import com.ssy.lingxi.settle.accounts.entity.ReconciliationFileDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

import java.util.List;

/**
 * 对账单附件
 * @author Saske
 * @date 2021/12/22
 * @version 2.0.0
 */
public interface ReconciliationFileRepository extends JpaRepository<ReconciliationFileDO,Long>, JpaSpecificationExecutor<ReconciliationFileDO>, QuerydslPredicateExecutor<ReconciliationFileDO> {

    /**
     * 根据对账单号查询对账单附件
     * @author Saske
     * @param reconciliationNo: 对账单号
     * @return 对账单附件列表
     **/
    List<ReconciliationFileDO> findAllByReconciliationNo(String reconciliationNo);

    /**
     * 根据对账单号删除对账单附件
     * @author Saske
     * @param reconciliationNo: 对账单号
     * @return 对账单附件列表
     **/
    Integer deleteByReconciliationNo(String reconciliationNo);

}
